package br.com.rhweb.modelos;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="tbl_endereco")
public class Endereco implements Serializable{
	
	@Id
	@Column(name="cep_endereco", length=10)
	private String cep;
	
	@Column(name="logradouro_endereco", length=255)
	private String logradouro;
	
	@ManyToOne
	@JoinColumn(name="id_bairro")
	private Bairro bairro;

	public String toString(){
		return cep;
	}
	
	public String getCep() {
		return cep;
	}

	public void setCep(String cep) {
		this.cep = cep;
	}

	public String getLogradouro() {
		return logradouro;
	}

	public void setLogradouro(String logradouro) {
		this.logradouro = logradouro;
	}

	public Bairro getBairro() {
		return bairro;
	}

	public void setBairro(Bairro bairro) {
		this.bairro = bairro;
	}
	
}
